package com.lt.hr.controller;

import com.alibaba.fastjson.JSON;
import com.lt.hr.entity.THrManageLoginList;
import com.lt.hr.service.THrManageLoginListService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * (THrManageLoginList)表控制层
 *
 * @author makejava
 * @since 2020-03-11 12:09:59
 */
@RestController
public class THrManageLoginListController {
    /**
     * 服务对象
     */
    @Resource
    private THrManageLoginListService tHrManageLoginListService;

    /**
     * 通过主键查询单条数据
     *
     * @return 单条数据
     */
    @PostMapping("getUser")
    public THrManageLoginList selectOne(@RequestBody String params) {
        try {
            Map<String, Object> map = JSON.parseObject(params);

            THrManageLoginList loginList = this.tHrManageLoginListService.queryById(map);

            return loginList;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}
